home *** CD-ROM | disk | FTP | other *** search
- open =$ffc0
- readst =$ffb7
- setlfs =$ffba
- setnam =$ffbd
- load =$ffd5
- getin =$ffe4
- clrchn =$ffcc
- close =$ffc3 ;a
- chrin =$ffcf
- chkout =$ffc9 ;x
- chkin =$ffc6 ;x
- plot =$fff0
- chrout =$ffd2
- color'pointer =243
- screen'line'pointer =209
- print'number =$bdcd ;x,a
- clear'line =59903
- background =53281
- border =53280
- unlisten =$ffae
- clall =$ffe7
- location =251
- index =253
- count =249
-
-
- .org $c000
- .mem
- .obj "@0:indexer c000"
-
-
- jsr get'number
- sty location
- sta location+1
-
- jsr get'number
- sty index
- sta index+1
-
- jsr rom'out
-
- lda #0
- sta count
- sta count+1
- sta length
-
- lda index
- ora index+1
- cmp #0
- beq found
-
- ldy #0
- - lda (location),y
- beq end'of'file
-
- inc location
- bne +
- inc location+1
-
- + cmp #13
- beq bump'count
- jmp -
-
- bump'count inc count
- bne +
- inc count+1
-
- + lda count+1
- cmp index+1
- bcc -
- lda count
- cmp index
- bcc -
-
- found ldy #0
- - lda (location),y
- cmp #13
- beq +
- inc length
- sta string,y
- iny
- bne -
-
- / jsr rom'in
- ldx <string'name
- ldy >string'name
- jsr locvar
- lda <length
- ldy >length
- jmp set'string
-
- end'of'file lda #0
- sta length ;in order to return null
- jmp -
-
-
- get'number jsr $aefd
- jsr $ad8a
- jmp $b7f7
-
- rom'out pha
- sei
- lda #$74
- sta 1
- pla
- rts
-
- rom'in pha
- lda #$77
- sta 1
- cli
- pla
- rts
- ;x and y point to string name
-
- locvar lda $7a
- pha
- lda $7b
- pha
- stx $7a
- sty $7b
- jsr $b08b
- sta $49
- sty $4a
- pla
- sta $7b
- pla
- sta $7a
- rts
-
- set'string sta $64
- sty $65
- jmp $aa52
-
- string'name .asc "w$":.byt 0
- length .byt 0
- .word string
- string .buf 40
-
-
-
-
-